﻿Imports System

Imports Microsoft.VisualStudio.TestTools.UnitTesting

Imports TodoManager


'''<summary>
'''This is a test class for TodoTest and is intended
'''to contain all TodoTest Unit Tests
'''</summary>
<TestClass()> _
Public Class TodoTest


    Private testContextInstance As TestContext

    '''<summary>
    '''Gets or sets the test context which provides
    '''information about and functionality for the current test run.
    '''</summary>
    Public Property TestContext() As TestContext
        Get
            Return testContextInstance
        End Get
        Set(ByVal value As TestContext)
            testContextInstance = Value
        End Set
    End Property

#Region "Additional test attributes"
    '
    'You can use the following additional attributes as you write your tests:
    '
    'Use ClassInitialize to run code before running the first test in the class
    '<ClassInitialize()>  _
    'Public Shared Sub MyClassInitialize(ByVal testContext As TestContext)
    'End Sub
    '
    'Use ClassCleanup to run code after all tests in a class have run
    '<ClassCleanup()>  _
    'Public Shared Sub MyClassCleanup()
    'End Sub
    '
    'Use TestInitialize to run code before running each test
    '<TestInitialize()>  _
    'Public Sub MyTestInitialize()
    'End Sub
    '
    'Use TestCleanup to run code after each test has run
    '<TestCleanup()>  _
    'Public Sub MyTestCleanup()
    'End Sub
    '
#End Region


    '''<summary>
    '''A test for Todo Constructor
    '''</summary>
    <TestMethod()> _
    Public Sub TodoConstructorTest()
        Dim target As Todo = New Todo()
        Assert.Inconclusive("TODO: Implement code to verify target")
    End Sub

    '''<summary>
    '''A test for name
    '''</summary>
    <TestMethod()> _
    Public Sub nameTest()

        'create new Todo
        Dim todo1 As Todo = New Todo()
        With todo1
            .Name = "Make the plan"
            .TodoPriority = Todo.Priority.Important
            .TodoStatus = Todo.Status.NotDone
        End With

        Dim todo2 As Todo = New Todo()
        With todo2
            .Name = "Execute the plan"
            .TodoPriority = Todo.Priority.Important
            .TodoStatus = Todo.Status.NotDone
        End With

        Dim manager As New TodoManager.TodoManager

        manager.addTodoForToday(todo1)
        manager.addTodoForToday(todo2)

        manager.addTodo(todo1, New Date())

        Dim todos As List(Of Todo)
        todos = manager.TodosForToday()
        todos = manager.TodosForNextDay()



        'Dim expected As String = String.Empty ' TODO: Initialize to an appropriate value
        'Dim actual As String
        'target.Name = expected
        'actual = target.Name
        'Assert.AreEqual(expected, actual)
        'Assert.Inconclusive("Verify the correctness of this test method.")
    End Sub
End Class
